package validationTestSuite.tests
{
	import com.google.code.flexmetavalidator.metavalidation.MetaValidator;
	
	import org.flexunit.Assert;
	import org.flexunit.asserts.assertFalse;
	import org.flexunit.asserts.assertTrue;
	
	import validationTestSuite.tests.vo.NotEmptyObject;
	import validationTestSuite.tests.vo.NotNullObject;
	
	public class NotEmptyTest extends MetaValidatorTest
	{
		public function NotEmptyTest()
		{
			super();
		}
		
		[Test]
		public function testString():void
		{
			var object : NotEmptyObject = new NotEmptyObject();
			object.varString = null;
			
			var testResult : Boolean = validator.validate(object);
			assertFalse(testResult);
			
			object.varString = "";
			testResult = validator.validate(object);
			assertFalse(testResult);
			
			object.varString = "ABCD";
			testResult = validator.validate(object);
			assertTrue(testResult);
			
			object.varString = null;
			testResult = validator.validate(object);
			assertFalse(testResult);
			
			for each (var errStr : String in validator.errors) {trace(errStr)}
		}
		
		
	}
}